package com.starbooks.tmail.dto;

import com.starbooks.tmail.annotation.DateValidator;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

public class ProfileForm {

  @Size(min=5, message = "name min 5 ")
  private String name;

  @NotBlank(message = "email 不可为空")
  @Email(message = "email 格式不对")
  private String email;

  @DateValidator
  private String date;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public String getDate() {
    return date;
  }

  public void setDate(String date) {
    this.date = date;
  }

  @Override
  public String toString() {
    return "ProfileForm{" +
        "name='" + name + '\'' +
        ", email='" + email + '\'' +
        ", date='" + date + '\'' +
        '}';
  }
}
